<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="referrer" content="never">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>抖音无水印下载</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <style>
        .flow-default {
            width: auto;
            height: auto;
            overflow: auto;
            font-size: 0;
        }

        .flow-default li {
            display: inline-block;
            margin: 0 5px;
            font-size: 14px;
            width: 44%;
            margin-bottom: 10px;
            height: 44%;
            line-height: 200%;
            text-align: center;
            background-color: #eee;
        }

        .flow-default img {
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<script src="/layui/layui.js" charset="utf-8"></script>

<body>
<div class="layui-tab-content">
    <h1 class="site-h1">抖音无水印下载</h1></br>
    <form class="layui-form" action="" id="form" name="form">
        <div class="layui-form-item">
            <div class="layui-col-xs9">
                <input type="text" id="word" name="word" placeholder="请输入抖音分享的（复制链接）" class="layui-input" style="width: 90%;">
            </div>
            <div class="layui-col-xs3">
                <button type="button" class="layui-btn layui-btn-normal" onclick="getDownload()">获取下载地址</button>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-col-xs9">
                <input type="text" id="url" name="url" placeholder="" class="layui-input" style="width: 90%;">
            </div>
            <div class="layui-col-xs3">
                <button type="button" class="layui-btn layui-btn-normal" onclick="goDownload()">点击下载</button>
            </div>
        </div>
        <div class="layui-form-mid layui-word-aux">例：#麦迪 和#罗斯 生涯多少有着很相似的地方，虽然我更喜欢前者，但大部分球迷肯定会选玫瑰#nba吐槽大会 https://v.douyin.com/JYtHbfK/ 复制此链接，打开【抖音短视频】，直接观看视频！</div>
    </form>
</div>
</br>
</br>
</br>
</br>
</br>
</br>
</br>

<div class="layui-tab-content">
    <h1 class="site-h1">哔哩哔哩下载</h1></br>
    <form class="layui-form" action="" id="form" name="form">
        <div class="layui-form-item">
            <div class="layui-col-xs9">
                <input type="text" id="biliWord" name="word" placeholder="请输入哔哩哔哩分享的（复制链接）" class="layui-input" style="width: 90%;">
            </div>
            <div class="layui-col-xs3">
                <button type="button" class="layui-btn layui-btn-normal" onclick="getBiliDownload()">获取下载地址</button>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-col-xs9">
                <input type="text" id="biliUrl" name="url" placeholder="" class="layui-input" style="width: 90%;">
            </div>
            <div class="layui-col-xs3">
                <button type="button" class="layui-btn layui-btn-normal" onclick="goBiliDownload()">点击下载</button>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-form-mid layui-word-aux">
                例：https://www.bilibili.com/video/BV1Lp4y1q77q
                </br>例：https://b23.tv/7RPS9F
                </br>哔哩哔哩音频分离，合成需要时间</div>
        </div>
    </form>
</div>

</body>

<script>
    var $;
    layui.use('element', function() {
        $ = layui.jquery;
    })

    function getDownload() {
        var word = $("#word").val();
        $.post('/douyin/getDownloadUrl', {
            "word": word
        }, function(res) {
            $("#url").val(res);
        });
    }

    function goDownload() {
        var url = $("#url").val();
        window.location.href = url;
    }

    function getBiliDownload() {
        var word = $("#biliWord").val();
        $.post('/bili/getDownloadUrl', {
            "url": word
        }, function(res) {
            $("#biliUrl").val(res);
        });
    }

    function goBiliDownload() {
        var url = $("#biliUrl").val();
        window.location.href = url;
    }
</script>

</html>